// 草地hcanvas子类
import canvasAbstract from './canvasAbstract';
import config from '../config';
import playModel from '../model/play';

export default  new (class play extends canvasAbstract implements ICanvas{
  name = 'play';
  num(): number {
    return 0;
  }
  model(): ModelInterface {
    return playModel;
  }
  render() {
    this.createModel();
    super.renderModel();
  };
  createModel() {
    [{ x: config.canvas.width / 2 + 5 * config.model.width, y: config.canvas.hieght - config.model.height }].forEach(pos => {
      const model = this.model();
      const instance = new model(pos.x, pos.y);
      this.modelist.push(instance);''
    });
  }
})('play');